package com.hl.product;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class MainApp {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("beans.xml");
        
        Product product = context.getBean("productOfName", Product.class);
        System.out.println("product = " + product);
        
        Product product1 = context.getBean("productOfIndex", Product.class);
        System.out.println("product1 = " + product1);
    }
}
